import http from "../../utils/http";
import {Api} from "../../utils/api";

Page({
    data: {
        supplierList: []
    },
    onLoad: function (options) {

    },
    onShow: function () {
        this.getSupplierList()
    },
    getSupplierList() {
        http.getRequest(Api.getSupplierList, {}, (res) => {
            this.setData({supplierList: res.data})
        })
    },
    toSupplierForm() {
        wx.navigateTo({url: '/pages/supplier/form/index'})
    }
});
